home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / ole2book.zip / CHAP04.ZIP / CHAP04 / DKOALA / MAKEFILE < prev   
Text File  |  1993-04-13  |  2KB  |  83 lines

  1. #
  2. # MAKEFILE
  3. # Koala Object version 1.00
  4. #
  5. # Copyright (c)1993 Microsoft Corporation, All Rights Reserved
  6. #
  7. # Kraig Brockschmidt, Software Design Engineer
  8. # Microsoft Systems Developer Relations
  9. #
  10. # Internet  :  kraigb@microsoft.com
  11. # Compuserve:  >INTERNET:kraigb@microsoft.com
  12. #
  13.  
  14. #Add '#' to the next line for 'noisy' operation
  15. !CMDSWITCHES +s
  16.  
  17. #
  18. #Compiler flags
  19. #Use "SET RETAIL=1" from MS-DOS to compile non-debug version.
  20. #
  21. !ifndef RETAIL
  22. CFLAGS  = -c -nologo -Od -AS -Zipe -G2s -W3 -GA -GEd -Aw
  23. LINK    = /al:16/ONERROR:NOEXE/CO
  24. DEFS    = -DSTRICT -D_WINDLL -DDEBUG
  25. !else
  26. CFLAGS  = -c -nologo -Oat -AS -Zpe -G2s -W3 -GA -GEd -Aw
  27. LINK    = /al:16/ONERROR:NOEXE
  28. DEFS    = -DSTRICT -D_WINDLL
  29. !endif
  30.  
  31. .SUFFIXES: .h .obj .exe .cpp .res .rc
  32.  
  33. TARGET  = dkoala
  34.  
  35. goal:   $(TARGET).dll
  36.  
  37. clean:
  38.     del *.obj
  39.     del *.res
  40.     del *.dll
  41.  
  42. LIBS    = libw sdllcew compobj ole2
  43. INCLS   = $(TARGET).h koala.h
  44. OBJS    = $(TARGET).obj koala.obj
  45. RCFILES =
  46.  
  47.  
  48. #####
  49.  
  50. .cpp.obj:
  51.     echo +++++++++
  52.     echo Compiling $*.cpp
  53.     cl $(CFLAGS) $(DEFS) $*.cpp
  54.  
  55. .rc.res:
  56.     echo +++++++++
  57.     echo Compiling Resources
  58.     rc -r $(DEFS) $*.rc
  59.  
  60.  
  61. #This rule builds a linker response file on the fly depending on debug flags
  62. $(TARGET).dll : $(OBJS) $(TARGET).res $(TARGET).def
  63.     echo ++++++++++
  64.     echo Linking $@
  65.     echo libentry.obj +                          > $(TARGET).lrf
  66.     echo $(OBJS)                                >> $(TARGET).lrf
  67.  
  68.     echo $(TARGET).dll $(LINK)                  >> $(TARGET).lrf
  69.     echo nul/li                                 >> $(TARGET).lrf
  70.     echo $(LIBS)/NOD/NOE                        >> $(TARGET).lrf
  71.     echo $(TARGET).def                          >> $(TARGET).lrf
  72.  
  73.     link @$(TARGET).lrf
  74.     rc -v $(TARGET).res $(TARGET).dll
  75.     del $(TARGET).lrf
  76.  
  77.  
  78. ##### Dependencies #####
  79.  
  80. $(TARGET).obj : $(TARGET).cpp $(INCLS)
  81. koala.obj     : koala.cpp     $(INCLS)
  82. $(TARGET).res : $(TARGET).rc  $(INCLS) $(RCFILES)
  83.